﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="HistoricoMovimentacaoEstoqueLista.aspx.cs" Inherits="InfraWEB.UI.HistoricoMovimentacaoEstoqueLista" MasterPageFile="~/GerenteMaster.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            color: #507CD1;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div>
			<h1 class="style3">Lista de Movimentações em Itens de Estoque</h1>
			<div class="error">
				<asp:Label runat="server" ID="lblMensagem" Visible="false"></asp:Label>
			    <br />
			    <br />
			</div>
			<div class="oneline">
				<br />
			</div>
			<asp:GridView ID="itemGridView" runat="server" CellPadding="4" 
                ForeColor="#333333" GridLines="None" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="HisId" 
                DataSourceID="SqlDataSource2">
                <RowStyle BackColor="#EFF3FB" />
                <Columns>
                    <asp:BoundField DataField="HisFuncionario" HeaderText="Funcionario" 
                        SortExpression="HisFuncionario" />
                    <asp:BoundField DataField="HisData" HeaderText="Data" 
                        SortExpression="HisData" />
                    <asp:BoundField DataField="HisTipo" HeaderText="Tipo" 
                        SortExpression="HisTipo" />
                    <asp:BoundField DataField="HisQuantidade" HeaderText="Quantidade" 
                        SortExpression="HisQuantidade" />
                    <asp:BoundField DataField="PreId" HeaderText="Prédio" 
                        SortExpression="PreId" />
                    <asp:BoundField DataField="IesId" HeaderText="Item" SortExpression="IesId" />
                    <asp:BoundField DataField="UsuId" HeaderText="Usuário" SortExpression="UsuId" />
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
		    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:infraConnectionString %>" 
                DeleteCommand="DELETE FROM [HistoricoMovimentacaoEstoque] WHERE [HisId] = @HisId" 
                InsertCommand="INSERT INTO [HistoricoMovimentacaoEstoque] ([HisFuncionario], [HisData], [HisTipo], [HisQuantidade], [PreId], [IesId], [UsuId]) VALUES (@HisFuncionario, @HisData, @HisTipo, @HisQuantidade, @PreId, @IesId, @UsuId)" 
                SelectCommand="SELECT * FROM [HistoricoMovimentacaoEstoque]" 
                
                UpdateCommand="UPDATE [HistoricoMovimentacaoEstoque] SET [HisFuncionario] = @HisFuncionario, [HisData] = @HisData, [HisTipo] = @HisTipo, [HisQuantidade] = @HisQuantidade, [PreId] = @PreId, [IesId] = @IesId, [UsuId] = @UsuId WHERE [HisId] = @HisId">
                <DeleteParameters>
                    <asp:Parameter Name="HisId" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="HisFuncionario" Type="String" />
                    <asp:Parameter Name="HisData" Type="DateTime" />
                    <asp:Parameter Name="HisTipo" Type="Int32" />
                    <asp:Parameter Name="HisQuantidade" Type="Int32" />
                    <asp:Parameter Name="PreId" Type="Int32" />
                    <asp:Parameter Name="IesId" Type="Int32" />
                    <asp:Parameter Name="UsuId" Type="Int32" />
                    <asp:Parameter Name="HisId" Type="Int32" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="HisFuncionario" Type="String" />
                    <asp:Parameter Name="HisData" Type="DateTime" />
                    <asp:Parameter Name="HisTipo" Type="Int32" />
                    <asp:Parameter Name="HisQuantidade" Type="Int32" />
                    <asp:Parameter Name="PreId" Type="Int32" />
                    <asp:Parameter Name="IesId" Type="Int32" />
                    <asp:Parameter Name="UsuId" Type="Int32" />
                </InsertParameters>
            </asp:SqlDataSource>
		</div>
</asp:Content>
